package com.xiangyang.controller;

import com.xiangyang.entity.Sceduling;
import com.xiangyang.entity.dto.Result;
import com.xiangyang.entity.vo.ScedulingAndEmployee;
import com.xiangyang.entity.vo.ScedulingLike;
import com.xiangyang.service.impl.ScedulingServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/Sceduling")
@CrossOrigin
public class ScedulingController {
    @Autowired
    public ScedulingServiceImpl scedulingService;

    @PostMapping("/addsceduling")
    public Result addSceduling(@RequestBody Sceduling sceduling) {
        return scedulingService.addSceduling(sceduling);
    }
    @PostMapping("/deletesceduling")
    public Result deleteSceduling(Long schedulingId) {
        return scedulingService.deleteSceduling(schedulingId);
    }
    @PostMapping("/querysceduling")
    public Result getScedulingList() {
        return scedulingService.getScedulingList();
    }
    @PostMapping("/changesceduling")
    public Result updataSceduling(@RequestBody  Sceduling sceduling) {
        return scedulingService.updataSceduling(sceduling);
    }
 @PostMapping("/queryscedulingLikebylike")
    public Result getScedulingList(@RequestBody ScedulingLike scedulingLike) {
        return scedulingService.getScedulingList(scedulingLike);
    }
}
